package com.feynman.pattern.singleton.lazy;

/**
 * @ClassName LazySingleton
 * @Description 懒汉模式
 * @Author Feynman
 * @date 2019/4/4 17:13
 * @Version V1.0
 **/
public class LazySimpleSingleton {

    private static LazySimpleSingleton lazy = null;

    private LazySimpleSingleton(){

    }

    public synchronized static LazySimpleSingleton getInstance(){
        if(lazy == null )
        {
            lazy = new LazySimpleSingleton();
        }
        return lazy;
    }
}
